package com.hotel.homehotel.before.entiy;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel
@TableName(value = "user_order")
public class Order {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "order_id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "房间id")
    private String roomId;

    @ApiModelProperty(value = "最终价格")
    private Double endPrice;

    @ApiModelProperty(value = "支付状态")
    @TableField("order_status")
    private Integer status;  //1为支付成功 0为未支付


    @ApiModelProperty(value = "开始时间")
    private Date beginTime;

    @ApiModelProperty(value = "结束时间")
    private  Date endTime;

    @JsonIgnore
    @ApiModelProperty(value = "创建时间",example = "2019-01-01 8:00:00")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @JsonIgnore
    @ApiModelProperty(value = "更新时间")
    @TableField(fill=FieldFill.INSERT_UPDATE)
    private Date updatedTime;


    @JsonIgnore
    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Integer isDeleted;

    @JsonIgnore
    @ApiModelProperty(value = "是否启用 1（true）启用， 0（false）禁用")
    private Integer isEnabled;

    @JsonIgnore
    @ApiModelProperty(value = "创建者")
    private String createdBy;

    @JsonIgnore
    @ApiModelProperty(value = "修改者")
    private String updatedBy;



}
